﻿#include "protreeitem.h"



ProTreeItem::ProTreeItem(QTreeWidget *view, const QString name, const QString path, int type)
    :QTreeWidgetItem(view,type), _path(path),_name(name),_root(this),_pre_item(nullptr),_next_item(nullptr)

{

}

ProTreeItem::ProTreeItem(QTreeWidgetItem *parent, const QString name, const QString path,
                         QTreeWidgetItem *root, int type) :QTreeWidgetItem(parent,type),
     _path(path),_name(name),_root(root),_pre_item(nullptr),_next_item(nullptr)
{

}

const QString &ProTreeItem::getName()
{
    return _name;
}

const QString &ProTreeItem::getPath()
{
    return _path;
}

const QTreeWidgetItem *ProTreeItem::getRootItem()
{
    return _root;
}

const QTreeWidgetItem *ProTreeItem::getPreItem()
{
    return _pre_item;
}

const QTreeWidgetItem *ProTreeItem::getNextItem()
{
    return _next_item;
}

void ProTreeItem::SetPreItem(QTreeWidgetItem *item)
{
    _pre_item = item;
}

void ProTreeItem::SetNextItem(QTreeWidgetItem *item)
{
    _next_item = item;
}
